from emmodels.em_base_data import ModuleBaseData
import tushare as ts
import datetime

index_info = ts.get_index()
l = []
for item in index_info.values:
    module_info = ModuleBaseData(moduleid=item[0], module_name=item[1], create_time=datetime.datetime.now())
    l.append(module_info)
ModuleBaseData.insert_list(l, append_dup_list=['moduleid','module_name','create_time'])


